import * as BABYLON from '@babylonjs/core';
import * as GUI from '@babylonjs/gui';
import { Drawer } from '../helper/Drawer';
export class Arrow extends GUI.Container {
    public direction?: string;
    constructor(name?: string) {
        super(name);
        this.scaleX = 0.9;
        this.scaleY = 0.9;
    }
    override _draw(context: BABYLON.ICanvasRenderingContext, invalidatedRectangle?: GUI.Measure): void {
        super._draw(context, invalidatedRectangle);
        if(this.direction && this.parent) {
            // var x = this.parent._currentMeasure.left;
            // var y = this.parent._currentMeasure.top;
            // var w = this.parent._currentMeasure.width;
            // var h = this.parent._currentMeasure.height;
            // Drawer.drawArrow(context, x + 1, y + 1, w, h, this.direction, '#333333');

            var x = this.parent._currentMeasure.left;
            var y = this.parent._currentMeasure.top;
            var w = this.parent._currentMeasure.width;
            var h = this.parent._currentMeasure.height;
            Drawer.drawArrow(context, x, y, w, h, this.direction, this.color);
        }
    }
}
